package com.meilai.project.controller.web.adMake.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.controller.web.adMake.dto.*;
import com.meilai.project.controller.web.adMake.entity.BillAdMake;
import com.meilai.project.controller.web.adMake.vo.BillAdMakeConfirmWebVO;
import com.meilai.project.controller.web.adMake.vo.BillAdMakePointFromMarketVO;
import com.meilai.project.controller.web.adMake.vo.BillAdMakeWebVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author yxg
 * @Date 2022/8/3 0:08
 */
public interface BillAdMakeService extends IService<BillAdMake> {

    /**
     * @description 根据市场单id，获取点位数据
     * @param marketId 市场单id
     * @author 张驰
     * @date 2022/8/16 10:38
     */
    BillAdMakePointFromMarketVO getPointsByMarketId(Long marketId);

    // 规格列表，根据媒体类型获取
    List<JSONObject> listMediaTypeSpec(Long media_type_id);

    // 材质列表，即画面属性(字典表)，根据媒体类型和规格获取
    List<JSONObject> listMediaPicType(Long media_type_id, String size_width, String size_height);

    // 广告制作单列表(带分页)
    Page<BillAdMakeWebVO> selectPageList(BillAdMakeSearchParams params);

    // 广告制作单列表
    List<BillAdMakeWebVO> selectDataList(BillAdMakeSearchParams params);

    // 导出供应商清单
    void exportSupplierDataExcel(HttpServletResponse response, BillAdMakeSearchParams params);

    // 生成链接弹框数据
    BillAdMakeWebVO supplierConfirmLinkData(Long adMakeId);

    // 详情
    BillAdMakeWebVO getOneById(Long id);

    // 保存
    boolean save(BillAdMakeCreateParams params);

    // 提交
    boolean begin(BillAdMakeCreateParams params);

    // 通过
    boolean pass(BillAdMakeCheckParams params);

    // 驳回
    boolean returnBack(BillAdMakeCheckParams params);

    // 删除
    boolean delete(Long id);

    // 彻底删除
    boolean actualDelete(Long id);

    // 生成供应商确认链接
    String generateConfirmLink(BillAdMakeGenerateParams params);

    // 获取已生成的供应商确认链接
    String getConfirmLink(BillAdMakeGenerateParams params);

    // 签字
    BillAdMakeConfirmResult signConfirmBill(BillAdMakeSignParams params);


    // 供应商确认详情
    BillAdMakeConfirmWebVO confirmBillDetail(String batchId);
}
